﻿@{
    Layout = null;
}
@model List<LeEdu.MODEL.Record>
<!DOCTYPE html>

<html>
<head>


    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta content="acdcccbbbcd0ceb9da02e9cd4c87736eb0033ee4" name="csrf-token" />
    <title>
        管理后台     | EduSoho
    </title>
    <link href="files/system/2015/06-20/102236c61b61855109.ico?6.9.3" rel="shortcut icon" />
    <script src="~/bootstrap-3.3.5-dist/jquery-2.0.0.min.js"></script>

    <link href="~/bootstrap-3.3.5-dist/bootstrap-3.3.5-dist/css/bootstrap.min.css" rel="stylesheet" />

    <script src="~/bootstrap-3.3.5-dist/bootstrap-3.3.5-dist/js/bootstrap.min.js"></script>
    <link href="~/Content/css/bootstrap.css" rel="stylesheet" />

    <link href="~/Content/css/common.css" rel="stylesheet" />

    <link href="~/Content/css/admin.css" rel="stylesheet" />

    <link href="~/Content/css/admin_v2.css" rel="stylesheet" />

    <link href="~/Content/css/es-icon.css" rel="stylesheet" />

    <script src="~/Content/utf8-net/ueditor.config.js"></script>

    <script src="~/Content/utf8-net/ueditor.all.js"></script>

    <script src="~/Scripts/jquery-1.8.2.min.js"></script>
    <link href="~/Content/css/main.css" rel="stylesheet" />
    @*<link href="~/Content/css/bootstrap.css" rel="stylesheet" />*@
    <link href="~/Content/css/common.css" rel="stylesheet" />
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js?6.9.3"></script>
      <script src="js/respond.min.js?6.9.3"></script>
    <![endif]-->





</head>
<body>
    <!-- 网页导航菜单分布视图 -->
    @Html.Partial("~/Views/Shared/HouTai_DaoHang.cshtml")

    <div class="container">
        <div class="row">

            <!-- 网页头部分布视图 -->
            @Html.Partial("~/Views/Shared/ClassManage_Left_Menu.cshtml")

            <div class="col-md-10">

                <div class="panel panel-default panel-col">
                    <div class="panel-heading">
                        学员管理

                        <div class="panel-bar">
                            <button class="btn btn-info btn-sm mhs" id="student-add-btn" data-toggle="modal" data-target="#modal"><i class="glyphicon glyphicon-plus"></i> 添加学员</button>
                            <a class="btn btn-info btn-sm mhs" href="/classroom/1/manage/student/import"><i class="glyphicon glyphicon-import"></i> 批量导入</a>
                            <a class="btn btn-info btn-sm mhs" href="/classroom/1/manage/student/export/student"><i class="glyphicon glyphicon-export"></i> 导出学员</a>
                        </div>

                    </div>
                    <div class="panel-body">
                        <ul class="nav nav-tabs mbl">
                            <li class="active">
                                <a href="/classroom/1/manage/students">
                                    正式学员
                                </a>
                            </li>
                            <li class="">
                                <a href="/classroom/1/manage/aduitor">
                                    旁听生
                                </a>
                            </li>
                        </ul>

                        <form class="form-inline well well-sm" action="ClassSou" method="post">
                            <div class="form-group">
                                <input class="form-control " placeholder="请输入用户名" name="name" value="" type="text">

                                <button class="btn btn-primary">搜索</button>
                            </div>
                        </form>
                        <table class="table table-striped" id="course-student-list">
                            <thead>
                                <tr>
                                    <th width="40%">学员</th>
                                    <th width="30%">学习进度</th>
                                    <th width="30%">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                @{
                                    //List<LeEdu.MODEL.Record> lst = ViewBag.rd;
                                    if (Model == null)
                                    {
                                        <tr class="empty"><td colspan="20">无学员记录</td></tr>
                                    }
                                    else
                                    {
                                        foreach (var item in Model)
                                        {
                                            <tr id="student-21-tr">
                                                <td class="media" style="vertical-align: middle;">
                                                    <a title="" data-original-title="" class="pull-left js-user-card" href="/user/21" data-card-url="/user/21/card/show" data-user-id="21">
                                                        <img class="avatar-sm" src="~/Content/images/avatar.png">
                                                    </a>

                                                    <a target="_blank" href="/user/21">@item.UserInfo.Uname</a>
                                                    <div class="text-muted text-sm">加入时间：@item.StartStudyTime</div>
                                                </td>
                                                <td style="vertical-align: middle;">
                                                    <div class="progress mvm" title="已学0课程">
                                                        <div class="progress-bar" style="width: 0%" data-toggle="tooltip" data-placement="right" data-original-title="0%">
                                                        </div>
                                                    </div>
                                                </td>
                                                <td style="vertical-align: middle;">
                                                    <div class="btn-group">
                                                        <a class="btn btn-default btn-sm" data-toggle="modal" data-target="#Fmodal" href="/Class/Sx/@item.RecordId">发私信</a>
                                                        <button class="btn btn-default btn-sm" data-toggle="modal" data-target="#Cmodal">查看资料</button>
                                                        <a href="#" type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
                                                            管理
                                                            <span class="caret"></span>
                                                        </a>
                                                        <ul class="dropdown-menu pull-right">
                                                            <li><a class="" href="/Class/ShowStuNotes/@item.RecordId" data-toggle="modal" data-target="#Bmodal">备注</a></li>
                                                            <li><a class="student-remove" href="/Class/DelStuden/@item.RecordId" data-user="学员">移除</a></li>
                                                        </ul>
                                                    </div>
                                                </td>
                                            </tr>
                                        }
                                    }
                                }



                            </tbody>
                        </table>

                    </div>
                </div>
            </div>
        </div>

        @*模态框 添加学员*@

        <div class="modal fade" id="modal" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title">添加学员</h4>
                    </div>
                    <div class="modal-body">
                        <form data-widget-cid="widget-0" novalidate="novalidate" id="student-create-form" class="form-horizontal" method="post" action="/Class/ClassStudent">
                            <div class="row form-group">
                                <div class="col-md-2 control-label">
                                    <label for="student-nickname">学员</label>
                                </div>
                                <div class="col-md-7 controls">
                                    <input data-explain="只能添加系统中已注册的用户" data-widget-cid="widget-1" id="student-nickname" name="YouXiang" class="form-control" data-url="/classroom/7/manage/student_check" placeholder="邮箱" type="text">
                                    <div class="help-block" id="tishi">只能添加系统中已注册的用户</div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2 control-label">
                                    <label for="buy-price">购买价格</label>
                                </div>
                                <div class="col-md-7 controls">
                                    <input data-explain="
          本课程的价格为54 乐币
                                  " data-widget-cid="widget-3" id="buy-price" name="RPrice" value="0" class="form-control" type="text">
                                    <div class="help-block">
                                        本课程的价格为
                                        54 乐币
                                    </div>
                                </div>
                            </div>
                            <div class="row form-group">
                                <div class="col-md-2 control-label">
                                    <label for="student-remark">备注</label>
                                </div>
                                <div class="col-md-7 controls">
                                    <input data-explain="选填" data-widget-cid="widget-2" id="student-remark" name="AddStuNotes" class="form-control" type="text">
                                    <div class="help-block">选填</div>
                                </div>
                            </div>
                            @Html.Hidden("StartStudyTime", DateTime.Now)
                            <input name="_csrf_token" value="99abd786ffba9bdbb73bf99ecd0e3de2da07a64c" type="hidden">
                            <button id="student-create-form-submit" type="submit" class="btn btn-primary pull-right" data-toggle="form-submit" data-target="#student-create-form" data-submiting-text="正在保存..." data-user="学员">保存</button>
                            <button type="button" class="btn btn-link pull-right" data-dismiss="modal">取消</button>
                        </form>
                    </div>

                    <div class="modal-footer">

                        <script>app.load('classroombundle/controller/classroom/student-create')</script>
                    </div>



                </div>
            </div>
        </div>


        @*模态框 发送私信*@

        <div class="modal fade" id="Fmodal" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                </div>
            </div>
        </div>


        @*模态框 查看资料*@
        @{
            LeEdu.MODEL.UserInfo uf = ViewBag.uf;
        }
        <div class="modal fade" id="Cmodal" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title">个人详细信息</h4>
                    </div>
                    <div class="modal-body">
                        <table class="table table-striped table-condenseda table-bordered">
                            <tbody>
                                <tr>
                                    <th width="25%">用户名</th>
                                    <td width="75%">
                                        <a class="pull-right" href="/user/10" target="_blank">个人主页</a>
                                        @uf.Uname
                                    </td>
                                </tr>
                                <tr>
                                    <th>Email</th>
                                    <td>
                                        @uf.Email
                                    </td>
                                </tr>
                                <tr>
                                    <th>姓名</th>
                                    <td>
                                        @uf.XingMing
                                    </td>
                                </tr>
                                <tr>
                                    <th>性别</th>
                                    <td>
                                        @(uf.Sex == 0 ? "女" : "男")
                                    </td>
                                </tr>
                                <tr>
                                    <th>公司</th>
                                    <td>
                                        @(uf.Company)
                                    </td>
                                </tr>
                                <tr>
                                    <th>职业</th>
                                    <td>
                                        @uf.Job
                                    </td>
                                </tr>
                                <tr>
                                    <th>头衔</th>
                                    <td>
                                        @uf.Post
                                    </td>
                                </tr>
                                <tr>
                                    <th>电话</th>
                                    <td>
                                        @uf.PhoneNum
                                    </td>
                                </tr>
                                <tr>
                                    <th>个人签名</th>
                                    <td>
                                        @uf.Idiograph
                                    </td>
                                </tr>
                                <tr>
                                    <th>自我介绍</th>
                                    <td>
                                        @uf.Self
                                    </td>
                                </tr>
                                <tr>
                                    <th>个人网站</th>
                                    <td>
                                        暂无
                                    </td>
                                </tr>
                                <tr>
                                    <th>微博</th>
                                    <td>
                                        @uf.WeChat
                                    </td>
                                </tr>
                                <tr>
                                    <th>微信</th>
                                    <td>
                                        @uf.WeChat
                                    </td>
                                </tr>
                                <tr>
                                    <th>QQ</th>
                                    <td>
                                        @uf.QQ
                                    </td>
                                </tr>
                            </tbody>
                        </table>

                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
        </div>

        @*模态框 备注*@

        <div class="modal fade" id="Bmodal" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                </div>
            </div>
        </div>

    </div>
    <script type="text/javascript">
        //获取焦点事件
        $('#student-nickname').focus(function () {
            //alert(1);
        })
        //失去焦点事件
        $('#student-nickname').blur(function () {

            var youxiang = $(this).val();

            $.post('/Class/Select', { youxiang: youxiang }, function (data) {

                if (data == 0) {
                    //alert('用户邮箱不存在');||

                    $('#tishi').html("该用户不存在");

                    return false;

                }
                if (data == 1) {
                    $('#tishi').html("OK!用户存在");
                }
            })

        })





    </script>
    <script>
        var app = {};
        app.debug = false;
        app.version = '6.9.3';
        app.httpHost = 'http://www.zhishile.com';
        app.basePath = '';
        app.theme = 'jianmo';
        app.themeGlobalScript = 'theme/global-script';
        app.jsPaths = { "common": "common", "theme": "\/themes\/jianmo\/js", "customwebbundle": "\/bundles\/customweb\/js", "customadminbundle": "\/bundles\/customadmin\/js", "topxiawebbundle": "\/bundles\/topxiaweb\/js", "topxiaadminbundle": "\/bundles\/topxiaadmin\/js", "classroombundle": "\/bundles\/classroom\/js" };
        app.crontab = '/common/crontab';

        var CKEDITOR_BASEPATH = app.basePath + '/assets/libs/ckeditor/4.6.7/';
        app.config = { "api": { "weibo": { "key": "" }, "qq": { "key": "" }, "douban": { "key": "" }, "renren": { "key": "" } }, "cloud": { "video_player": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/GrindPlayer.swf", "video_player_watermark_plugin": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Watermake-1.0.3.swf", "video_player_fingerprint_plugin": "http:\/\/cdn.staticfile.org\/GrindPlayerCN\/1.0.2\/Fingerprint-1.0.1.swf" }, "loading_img_path": "\/assets\/img\/default\/loading.gif?6.9.3" };
        app.arguments = {};
        app.controller = 'user/list';

        app.scripts = null;

        app.uploadUrl = '/file/upload';
        app.imgCropUrl = '/file/img/crop';
        app.lessonCopyEnabled = '0';
        app.mainScript = '/bundles/topxiaadmin/js/admin-app.js?6.9.3';
    </script>
    <script src="/Content/js/sea.js?6.9.3"></script>
    <script src="/Content/js/seajs-style.js?6.9.3"></script>
    <script src="/Content/js/seajs-global-config.js?6.9.3"></script>
    <script>
        seajs.use(app.mainScript);
    </script>  <div id="modal" class="modal"></div>
    <div class="fixed-bar">
        <a href="/admin/feedback" target='_blank' class="icon-question-text feedback">
            <i class="es-icon es-icon-help"></i>
            <span>产品<br />反馈</span>
        </a>
    </div>
</body>

</html>
